<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png">
    <HelloWorld msg="Welcome to Your Vue.js App"/>
    <AxiosMethod msg="axios请求测试"/>
    <MultiAxios msg="axios多个实例，多个地址请求测试"/>
    <AxiosInterceptor msg="axios多个实例，多个地址请求测试"/>
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'
import AxiosMethod from './components/AxiosMethod.vue'
import MultiAxios from './components/MultiAxios.vue'
import AxiosInterceptor from './components/MultiAxios.vue'

import axios from 'axios'

export default {
  name: 'App',
  components: {
    HelloWorld,
    AxiosMethod,
    MultiAxios,
    AxiosInterceptor
  },
  created(){
    axios.get('/data.json').then((res)=>{
      console.info(res)
      if(res.status==200){
        console.info(res.data)
      }
    })
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
